using System;
using System.Collections.Specialized; 
using System.Collections.Generic;
using System.Text; 
namespace HermesPortal.Core
{
    public class Realm
    {
        int _realmID = 0;
        int _sagaID = 0;
        int _parentId =0;
        int _creatorID = 0;
        bool _isPrivate = true;
        string _title =string.Empty;
        string _summary = string.Empty ;
        string _description = null;
       
        public int CreatorID
        {
            get { return _creatorID; }
            set { _creatorID = value; }
        }

        public bool IsPrivate
        {
            get { return _isPrivate; }
            set { _isPrivate = value; }
        }

        public int RealmID
        {
            get { return _realmID; }
            set { _realmID = value; }
        }

        public int SagaID
        {
            get { return _sagaID; }
            set { _sagaID = value; }
        }
        
        public int ParentID
        {

            get { return _parentId; }
            set { _parentId = value; }
        }

        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

       
        public string Summary
        {
            get 
            { return _summary;  }
            set { _summary = value; }
        }

        // using lazy load pattern
        public string Description
        {
            get
            {
                if (_description == null ||_description == String.Empty)
                {
                    _description =  RealmServices.GetRealmDescription(this.RealmID);
                    return _description; 
                }
                return _description;
            }
            set { _description = value; }
        }

       
       
    }
}
